import request from '@/utils/request'

/*
 * 职工勤务
 */

// 类型列表
export function typeIndex(params) {
  return request({
    url: 'leave_user_cate/index',
    method: 'GET',
    params
  })
}

// 类型添加
export function typeAdd(data) {
  return request({
    url: 'leave_user_cate/add',
    method: 'POST',
    data: data
  })
}

// 类型详情
export function typeDetail(params) {
  return request({
    url: 'leave_user_cate/edit',
    method: 'GET',
    params
  })
}

// 类型编辑
export function typeEdit(data) {
  return request({
    url: 'leave_user_cate/edit',
    method: 'POST',
    data: data
  })
}

// 类型删除
export function typeDelete(params) {
  return request({
    url: 'leave_user_cate/delete',
    method: 'GET',
    params
  })
}

// 请假列表
export function leaveIndex(params) {
  return request({
    url: 'leave_user/index',
    method: 'GET',
    params
  })
}

// 请假添加
export function leaveAdd(data) {
  return request({
    url: 'leave_user/add',
    method: 'POST',
    data: data
  })
}

// 请假详情
export function leaveDetail(params) {
  return request({
    url: 'leave_user/edit',
    method: 'GET',
    params
  })
}

// 请假编辑
export function leaveEdit(data) {
  return request({
    url: 'leave_user/edit',
    method: 'POST',
    data: data
  })
}

// 请假删除
export function leaveDelete(data) {
  return request({
    url: 'leave_user/delete',
    method: 'POST',
    data: data
  })
}

// 请假通过审核
export function leaveAdpot(data) {
  return request({
    url: 'leave_user/adopt',
    method: 'POST',
    data: data
  })
}

// 请假驳回审核
export function leaveReject(data) {
  return request({
    url: 'leave_user/reject',
    method: 'POST',
    data: data
  })
}

// 确认取消请假单
export function leaveCancel_examine(data) {
  return request({
    url: 'leave_user/cancel_examine',
    method: 'POST',
    data: data
  })
}

// 签到记录
export function signIndex(params) {
  return request({
    url: 'leave_user_sign/index',
    method: 'GET',
    params
  })
}

// 排班倒入模版
export function scheduling_user_import(data) {
  return request({
    url: 'scheduling_user/import',
    method: 'POST',
    data: data
  })
}

// 排班列表
export function scheduling_user_index(params) {
  return request({
    url: 'scheduling_user/index',
    method: 'get',
    params
  })
}

// 排班类型
export function scheduling_index(data) {
  return request({
    url: 'scheduling/index',
    method: 'POST',
    data: data
  })
}

// 排班编辑
export function scheduling_edit(data) {
  return request({
    url: 'scheduling/edit',
    method: 'POST',
    data: data
  })
}
